package com.zy.edu.service;

import com.zy.edu.bean.CourseChapterHomeworkStu;
import com.baomidou.mybatisplus.service.IService;
import com.zy.edu.bean.InputParam;
import com.zy.edu.bean.StatsAbility;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author HuangHaiShui
 * @since 2021-08-26
 */
public interface CourseChapterHomeworkStuService extends IService<CourseChapterHomeworkStu> {

    void updateAllStatus(String id);

    Map submit(CourseChapterHomeworkStu courseChapterHomeworkStu, InputParam inputParam);
    Map correct(CourseChapterHomeworkStu courseChapterHomeworkStu, InputParam inputParam);

    Map getByStuId(InputParam inputParam);

    Map getByClsId(CourseChapterHomeworkStu courseChapterHomeworkStu, InputParam inputParam);

    //统计班级已提交的作业数量
    //不传作业id hkId，则统计全班
    //score  是否已评分
    int countByClsId(String clsId,boolean flag,String hkId,boolean score);

    void deleteByHkId(String id,String clsId);

    //血清分析 统计学生的能力平均分，四舍五入
    StatsAbility getAbility(String id);
}
